package mil.af.amc.adpetracker.service;

import mil.af.amc.adpetracker.model.DRA;
import mil.af.amc.adpetracker.service.exceptions.DraExistsException;
import mil.af.amc.adpetracker.service.exceptions.DraNotFoundException;
import mil.af.amc.adpetracker.service.exceptions.DraAccountsStillAssignedException;

import java.util.Map;
import java.util.List;

/**
 * Please Fill in this Javadoc
 *
 * @author TSgt Jason Ferguson
 */

public interface DraService {

    /**
     * Add a new DRA
     *
     * @param draMap
     * @return
     * @throws DraExistsException
     */
    DRA addDra(Map draMap) throws DraExistsException;

    /**
     * Edit an existing DRA
     *
     * @param draMap
     * @return
     * @throws DraNotFoundException
     */
    DRA editDra(Map draMap) throws DraNotFoundException;

    /**
     * Retrieve a DRA by it's unique ID
     *
     * @param draId     int representing the unique ID of the DRA
     * @return a DRA with the given unique identifier
     * @throws DraNotFoundException     thrown when no DRA is found with the given ID
     */
    DRA getById(int draId) throws DraNotFoundException;

    /**
     * Delete a DRA
     *
     * @param draMap    Map representing form values from the Struts 1.X DynaValidatorForm
     * @throws DraNotFoundException
     * @throws DraAccountsStillAssignedException
     */
    void deleteDra(Map<String, String> draMap) throws DraNotFoundException, DraAccountsStillAssignedException;

    /**
     * Retrieve a list of all DRAs
     *
     * @return  a List of all DRA objects
     */
    List<DRA> getAll();


}
